<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>flexBox练习</title>
    <style type="text/css">
        html {
            padding: 0;
            margin: 0;
            width: 100vw;
            height: 100%;
            background-color: red;
        }

        body {
            width: 100%;
            height: 100%;
            background-color: cadetblue;
        }

        #container {
            width: 100%;
            height: 100%;
            background-color: aquamarine;
            display: flex;
            flex: 1;
            flex-direction: column;
            box-sizing: border-box;
        }

        .title-container-row {
            width: 100%;
            height: 60px;
            text-align: center;
            display: flex;
            flex-direction: row;
            justify-content: space-between;
            box-sizing: border-box;
            padding: 0 50px;
        }

        .title-container-row-left {
            display: flex;
            flex: 1;
            align-items: center;
        }

        .title-container-row-right {
            flex: 1;
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: space-around;
        }

        .content {
            display: flex;
            flex: 1;
            flex-direction: column;
            height: 100%;
            overflow: hidden;
        }

        .message-list {
            flex: 1;
            overflow-y: scroll;
        }

        .list-item {
            height: 600px;
        }

        .footer {
            height: 200px;
            background-color: green;
        }

        .width-class {
            width: 100%;
            height: 60px;
            background-color: red;
            padding-left: 80px;
            box-sizing: border-box;
        }
    </style>
</head>

<body>
    <div id="container">
        <div class="title-container-row">
            <div class="title-container-row-left">
                <span>你要的布局</span>
            </div>
            <div class="title-container-row-right">
                <span>首页 </span>
                <span>产品展示 </span>
                <span>技术服务 </span>
                <span>新闻资讯</span>
                <span>关于我们</span>
            </div>
        </div>
        <div class="content">
            <div class="message-list">
                <div class="list-item"> <span>我是第一行</span></div>
                <div class="list-item"> <span>我是第二行</span></div>
                <div class="list-item"> <span>我是第三行</span></div>
                <div class="list-item"> <span>我是第四行</span></div>
                <div class="list-item"> <span>我是第五行</span></div>
                <div class="list-item"> <span>我是第六行</span></div>
                <div class="list-item"> <span>我是第一行</span></div>
                <div class="list-item"> <span>我是第二行</span></div>
                <div class="list-item"> <span>我是第三行</span></div>
                <div class="list-item"> <span>我是第四行</span></div>
                <div class="list-item"> <span>我是第五行</span></div>
                <div class="list-item"> <span>我是第六行</span></div>
                <div class="list-item"> <span>我是第一行</span></div>
                <div class="list-item"> <span>我是第二行</span></div>
                <div class="list-item"> <span>我是第三行</span></div>
                <div class="list-item"> <span>我是第四行</span></div>
                <div class="list-item"> <span>我是第五行</span></div>
                <div class="list-item"> <span>我是第六行</span></div>
                <div class="list-item"> <span>我是第一行</span></div>
                <div class="list-item"> <span>我是第二行</span></div>
                <div class="list-item"> <span>我是第三行</span></div>
                <div class="list-item"> <span>我是第四行</span></div>
                <div class="list-item"> <span>我是第五行</span></div>
                <div class="list-item"> <span>我是第六行</span></div>
                <div class="list-item"> <span>我是第一行</span></div>
                <div class="list-item"> <span>我是第二行</span></div>
                <div class="list-item"> <span>我是第三行</span></div>
                <div class="list-item"> <span>我是第四行</span></div>
                <div class="list-item"> <span>我是第五行</span></div>
                <div class="list-item"> <span>我是第六行</span></div>
                <div class="list-item"> <span>我是第一行</span></div>
                <div class="list-item"> <span>我是第二行</span></div>
                <div class="list-item"> <span>我是第三行</span></div>
                <div class="list-item"> <span>我是第四行</span></div>
                <div class="list-item"> <span>我是第五行</span></div>
                <div class="list-item"> <span>我是第六行</span></div>
                <div class="list-item"> <span>我是第一行</span></div>
                <div class="list-item"> <span>我是第二行</span></div>
                <div class="list-item"> <span>我是第三行</span></div>
                <div class="list-item"> <span>我是第四行</span></div>
                <div class="list-item"> <span>我是第五行</span></div>
                <div class="list-item"> <span>我是第六行</span></div>
                <div class="list-item"> <span>我是第一行</span></div>
                <div class="list-item"> <span>我是第二行</span></div>
                <div class="list-item"> <span>我是第三行</span></div>
                <div class="list-item"> <span>我是第四行</span></div>
                <div class="list-item"> <span>我是第五行</span></div>
                <div class="list-item"> <span>我是第六行</span></div>
                <div class="list-item"> <span>我是第一行</span></div>
                <div class="list-item"> <span>我是第二行</span></div>
                <div class="list-item"> <span>我是第三行</span></div>
                <div class="list-item"> <span>我是第四行</span></div>
                <div class="list-item"> <span>我是第五行</span></div>
                <div class="list-item"> <span>我是第六行</span></div>
                <div class="list-item"> <span>我是第一行</span></div>
                <div class="list-item"> <span>我是第二行</span></div>
                <div class="list-item"> <span>我是第三行</span></div>
                <div class="list-item"> <span>我是第四行</span></div>
                <div class="list-item"> <span>我是第五行</span></div>
                <div class="list-item"> <span>我是第六行</span></div>
                <div class="list-item"> <span>我是第一行</span></div>
                <div class="list-item"> <span>我是第二行</span></div>
                <div class="list-item"> <span>我是第三行</span></div>
                <div class="list-item"> <span>我是第四行</span></div>
                <div class="list-item"> <span>我是第五行</span></div>
                <div class="list-item"> <span>我是第六行</span></div>
                <div class="list-item"> <span>我是第一行</span></div>
                <div class="list-item"> <span>我是第二行</span></div>
                <div class="list-item"> <span>我是第三行</span></div>
                <div class="list-item"> <span>我是第四行</span></div>
                <div class="list-item"> <span>我是第五行</span></div>
                <div class="list-item"> <span>我是第六行</span></div>
                <div class="list-item"> <span>我是第一行</span></div>
                <div class="list-item"> <span>我是第二行</span></div>
                <div class="list-item"> <span>我是第三行</span></div>
                <div class="list-item"> <span>我是第四行</span></div>
                <div class="list-item"> <span>我是第五行</span></div>
                <div class="list-item"> <span>我是第六行</span></div>
                <div class="list-item"> <span>我是第一行</span></div>
                <div class="list-item"> <span>我是第二行</span></div>
                <div class="list-item"> <span>我是第三行</span></div>
                <div class="list-item"> <span>我是第四行</span></div>
                <div class="list-item"> <span>我是第五行</span></div>
                <div class="list-item"> <span>我是第六行</span></div>
                <div class="list-item"> <span>我是第一行</span></div>
                <div class="list-item"> <span>我是第二行</span></div>
                <div class="list-item"> <span>我是第三行</span></div>
                <div class="list-item"> <span>我是第四行</span></div>
                <div class="list-item"> <span>我是第五行</span></div>
                <div class="list-item"> <span>我是第六行</span></div>
            </div>
            <div class="footer">
                <div>我是底部区域</div>
            </div>
        </div>
    </div>
    <script type="text/javascript">

        const recordsList = []
        recordsList.splice(0)
        //模拟1000条消息
        for (let i = 0; i < 1000; i++) {
            recordsList.push({
                id: i,
                msg: '我是消息' + i
            })
        }
        function phoneFilter(value) {
            if (typeof value === "number") {
                var num = new Number(value)
                value = num.toString(10)
                console.log(typeof value)
            }
            let start = value.slice(0, 3)
            let main = value.slice(3, 7)
            let end = value.slice(7)
            return start + "-" + main + "-" + end
        }
        const p = phoneFilter(13711046293)
        console.log(p)
    </script>
</body>

</html>